package cn.endeavour.quartz.config;

import org.quartz.*;

import java.text.SimpleDateFormat;
import java.util.Date;


/**
 * 定时任务的业务代码
 */
public class PrintTimeJob implements Job{
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException{
        System.out.println(context.getJobDetail().getJobDataMap().get("params"));

        System.out.println("current time :"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS").format(new Date()));
    }
}
